home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10779 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  775 b 

  1. Path: news.compusult.nf.ca!usenet
  2. From: "Barry A. Ryan" <bryan@public.compusult.nf.ca>
  3. Newsgroups: comp.lang.c
  4. Subject: Question on Heap Memory
  5. Date: 20 Mar 1996 00:17:52 GMT
  6. Organization: Compusult Limited, St. John's, NF, Canada
  7. Message-ID: <4inirg$9qv@hobbes.compusult.nf.ca>
  8. NNTP-Posting-Host: ts00_p17.remote.nfld.com
  9.  
  10. Hi 
  11.  
  12. Is there a way to declare a large structure in the heap area of
  13. memory without using malloc?  A global structure uses the
  14. global area of memory, a local uses the stack.  How can 
  15. space be allocated/reserved in the heap area with a structure 
  16. declaration such as/similar to:
  17.  
  18.  struct matrix{
  19.     int a;
  20.     int b;
  21.         float c;
  22.     etc.
  23.     etc.
  24.     } matrix1[1000][1000];
  25.  
  26. Due to the size I need to use allot of heap space. Can it be done 
  27. without malloc?
  28.  
  29.  
  30.